﻿@page "/students/create"

@inherits CreateModel

<h2>Create</h2>

<h4>Student</h4>
<hr />
<div class="row">
    <div class="col-md-4">
        <form novalidate="novalidate">
            <div class="form-group">
                <label for="LastName" class="control-label">Last Name</label>
                <input name="LastName" id="LastName" bind="@Student.LastName" class="form-control" />
            </div>
            <div class="form-group">
                <label for="FirstMidName" class="control-label">First Name</label>
                <input name="FirstMidName" id="FirstMidName" bind="@Student.FirstMidName" class="form-control" />
                <span class="text-danger"></span>
            </div>
            <div class="form-group">
                <label for="EnrollmentDate" class="control-label">Enrollment Date</label>
                <div class="row">
                    <div class="col-sm-4">
                        <select class="custom-select" bind="@Day">
                            <option selected="">Day</option>
                            @for (var dayCounter = 1; dayCounter <= LastDayInMonth; dayCounter++)
                            {
                                <option value="@dayCounter">@dayCounter</option>
                            }
                        </select>
                    </div>
                    <div class="col-sm-4">
                        <select class="custom-select" bind="@Month">
                            <option selected="">Month</option>
                            <option value="1">Jan</option>
                            <option value="2">Feb</option>
                            <option value="3">Mar</option>
                            <option value="4">Apr</option>
                            <option value="5">May</option>
                            <option value="6">Jun</option>
                            <option value="7">Jul</option>
                            <option value="8">Aug</option>
                            <option value="9">Sep</option>
                            <option value="10">Oct</option>
                            <option value="11">Nov</option>
                            <option value="12">Dec</option>
                        </select>
                    </div>
                    <div class="col-sm-4">
                        <select class="custom-select" bind="@Year">
                            <option selected="">Year</option>
                            @for (var counter = 2018; counter >= 1900; counter--)
                            {
                                <option value="@counter">@counter</option>
                            }
                        </select>
                    </div>
                </div>
                <span class="text-danger"></span>
            </div>
        </form>
        <div class="form-group">
            <a href="/students" class="btn btn-default">Cancel</a>
            <button class="btn btn-primary" onclick="@OnSaveClick">Save</button>
        </div>
    </div>
</div>
